<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改项目立项')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-project-edit" >
        	<h4 class="form-header h4">确定项目</h4>
            <div class="form-group">    
                <label class="col-sm-3 control-label">项目名称：</label>
                <div class="col-sm-8" style="top: 8px">
                	<input type="hidden" th:value="${gcProject.id}" name="gcProjectId"> 
                	<input type="hidden" th:value=${xmxq.id} name="xmxqId">
                    <span th:text="${gcProject.name}" >
                </div>
            </div>
            <div class="form-group">
            	<label class="col-sm-3 control-label is-required">项目签订日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="xmxqriq" th:value="${#dates.format(xmxq.riq, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
            	<label class="col-sm-3 control-label is-required">项目成本预估时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="pgsj" th:value="${#dates.format(cbpj.pgsj, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">上传正式总承包合同：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="xmxqupdateAt" th:value="${#dates.format(xmxq.updateAt, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            
            <h4 class="form-header h4">设备材料合同</h4>
            <div th:each="obj : ${sbclhtlis}">
	            <div class="form-group"> 
	            	<input type="hidden" th:value="${obj.id}" name="sbclhtId"> 
	            	<label class="col-sm-3 control-label">供应商：</label>
	            	<label class="col-sm-8 control-label" style="text-align: left;" th:text="${obj.supplyName}"></label>
	            </div>
	            <div class="form-group"> 
	            	<label class="col-sm-3 control-label is-required">合同时间：</label>
	                <div class="col-sm-8">
	                    <div class="input-group date">
	                        <input name="sbclhtcreateAt" th:value="${#dates.format(obj.createAt, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
	                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
	                    </div>
	                </div>   
	            </div>
            </div>
            <h4 class="form-header h4">施工安装合同</h4>
            <div th:each="obj : ${sgazhtlis}">
	            <div class="form-group"> 
	            	<input type="hidden" th:value="${obj.id}" name="sgazhtId"> 
	            	<label class="col-sm-3 control-label">供应商：</label>
	            	<label class="col-sm-8 control-label" style="text-align: left;" th:text="${obj.supplyName}"></label>
	            </div>
	            <div class="form-group"> 
	            	<label class="col-sm-3 control-label is-required">合同时间：</label>
	                <div class="col-sm-8">
	                    <div class="input-group date">
	                        <input name="sgazhtcreateAt" th:value="${#dates.format(obj.createAt, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
	                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
	                    </div>
	                </div>   
	            </div>
            </div>
            <h4 class="form-header h4">工程其它合同</h4>
            <div th:each="obj : ${otherlis}">
	            <div class="form-group"> 
	            	<input type="hidden" th:value="${obj.id}" name="otherId"> 
	            	<label class="col-sm-3 control-label">供应商：</label>
	            	<label class="col-sm-8 control-label" style="text-align: left;" th:text="${obj.supplyName}"></label>
	            </div>
	            <div class="form-group"> 
	            	<label class="col-sm-3 control-label is-required">合同时间：</label>
	                <div class="col-sm-8">
	                    <div class="input-group date">
	                        <input name="othercreateAt" th:value="${#dates.format(obj.createAt, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
	                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
	                    </div>
	                </div>   
	            </div>
            </div>
            <h4 class="form-header h4">款项支付</h4>
            <div class="form-group" th:each="obj : ${fklis}"> 
            	<label class="col-sm-6 control-label">
            	<input type="hidden" th:value="${obj.id}" name="fkId"> 
            	<span th:text="${obj.fpType}"></span>&nbsp;&nbsp;
            	<span th:text="${obj.xmfzr}"></span>&nbsp;&nbsp;
            	<span th:text="${obj.ckdw}"></span>&nbsp;&nbsp;
            	<span th:text="${obj.ljzf}"></span></label>
                <div class="col-sm-5">
                    <div class="input-group date">
                        <input name="fkriq" th:value="${#dates.format(obj.riq, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div> 
            </div>
            <h4 class="form-header h4">进项成本发票</h4>
            <div class="form-group" th:each="obj : ${fkfplis}"> 
            	<input type="hidden" th:value="${obj.id}" name="fkfpId"> 
            	<label class="col-sm-6 control-label">
            	<span th:text="${obj.fpType}"></span>&nbsp;&nbsp;
            	<span th:text="${obj.fpNo}"></span>&nbsp;&nbsp;
            	<span th:text="${obj.ckdw}"></span>&nbsp;&nbsp;
            	<span th:text="${obj.fpjine}"></span></label>
                <div class="col-sm-5">
                    <div class="input-group date">
                        <input name="fkfpriq" th:value="${#dates.format(obj.fpriq, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div> 
            </div>
            <h4 class="form-header h4">申请开票</h4>
            <div class="form-group" th:each="obj : ${sqkplis}"> 
            	<input type="hidden" th:value="${obj.id}" name="sqkpId"> 
            	<label class="col-sm-6 control-label">
            	单位名称：<span th:text="${gcProject.customerName}"></span>&nbsp;&nbsp;
            	合同金额：<span th:text="${obj.hej}"></span></label>
                <div class="col-sm-5">
                    <div class="input-group date">
                        <input name="sqkpsqsj" th:value="${#dates.format(obj.sqsj, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div> 
            </div>
            <h4 class="form-header h4">销项发票</h4>
            <div class="form-group" th:each="obj : ${sqkpfplis}"> 
            	<input type="hidden" th:value="${obj.id}" name="sqkpfpId"> 
            	<label class="col-sm-6 control-label">
            	<span th:text="${obj.fpNo}"></span>&nbsp;&nbsp;
            	<span th:text="${obj.ckdw}"></span>&nbsp;&nbsp;
            	<span th:text="${obj.fpjine}"></span></label>
                <div class="col-sm-5">
                    <div class="input-group date">
                        <input name="sqkpfpriq" th:value="${#dates.format(obj.fpriq, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div> 
            </div>
            
            <h4 class="form-header h4">确认收款</h4>
            <div class="form-group" th:each="obj : ${qrskList}"> 
            	<input type="hidden" th:value="${obj.id}" name="qrskId"> 
            	<label class="col-sm-6 control-label">
            	<span th:text="${obj.type}"></span>&nbsp;&nbsp;
            	<span th:text="${obj.qrjine}"></span></label>
                <div class="col-sm-5">
                    <div class="input-group date">
                        <input name="qrskAt" th:value="${#dates.format(obj.skAt, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div> 
            </div>
            
            <h4 class="form-header h4">项目竣工结算</h4>
            <div class="form-group"> 
            	<label class="col-sm-6 control-label">结算时间：</label>
                <div class="col-sm-5">
                    <div class="input-group date">
                        <input name="gcProjectupdateAt" th:value="${#dates.format(gcProject.updateAt, 'yyyy-MM-dd')}" class="form-control" required placeholder="yyyy-MM-dd" type="text" autoComplete="off" >
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div> 
            </div>
        </form>
    </div>
    <div class="row">
        <div class="col-sm-offset-5 col-sm-10">
            <button type="button" class="btn btn-sm btn-primary" onclick="submitHandler()"><i class="fa fa-check"></i>提 交</button>&nbsp;
            <button type="button" class="btn btn-sm btn-danger" onclick="closeItem()"><i class="fa fa-reply-all"></i>关 闭 </button>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    
    <script th:inline="javascript">
        var prefix = ctx + "gcgl/project";
        
        $("input[name='pgsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='xmxqriq']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='xmxqupdateAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='gcProjectupdateAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='sbclhtcreateAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='sgazhtcreateAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='othercreateAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='fkriq']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='fkfpriq']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='sqkpsqsj']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='sqkpfpriq']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("input[name='qrskAt']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        
        $("#form-project-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.saveTab(prefix + "/saveGcProjectUpVo", $('#form-project-edit').serialize());
            }
        }
    </script>
</body>
</html>